﻿using System;
using System.Collections.Generic;
using System.Data.Objects.SqlClient;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ZBJF.Warranty.Common.Common;
using ZBJF.Warranty.Common.Enums.InsuranceWarranty;
using ZBJF.Warranty.Model;
using ZBJF.Warranty.Model.ViewModel.InsuranceWarranty;

namespace ZBJF.Warranty.BLL
{
    public partial class InsuranceWarrantyBendTheRulesRecordService
    {
        public InsuranceWarrantyBendTheRulesRecord LoadById(int id)
        {
            return LoadEntities(n => n.ID.Equals(id)).FirstOrDefault();
        }
        public bool IsExist(long insuranceWarrantyRecordID, byte bendTheRulesWith)
        {
            return LoadEntities(n => n.InsuranceWarrantyRecordID == insuranceWarrantyRecordID && bendTheRulesWith == n.BendTheRulesWith).Any();
        }
    }
}
